package com.cloud.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.cloud.domain.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

/**
 * 部门地区负责人
 *
 * @author yzj
 * @since 2022-11-21
 */
@Data
@Schema(name = "SysDeptArea对象", description = "系统管理")
@TableName("sys_dept_area")
public class SysDeptArea extends BaseEntity {

    @Schema(description = "主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @Schema(description = "父级节点")
    private Long parentId;

    @Schema(description = "部门id")
    private Long deptId;

    @Schema(description = "地区编码")
    private String areaCode;

    @Schema(description = "地区名称")
    private String areaName;

    @Schema(description = "负责人id")
    private Long userId;

    @Schema(description = "备注")
    private String remark;

    @Schema(description = "部门名称")
    @TableField(exist = false)
    private String deptName;

    @Schema(description = "负责人昵称")
    @TableField(exist = false)
    private String nickName;

    @Schema(description = "负责人电话")
    @TableField(exist = false)
    private String phone;

    @Schema(description = "值班电话")
    @TableField(exist = false)
    private String dutyPhone;

    @Schema(description = "子级区域", hidden = true)
    @TableField(exist = false)
    private List<SysDeptArea> children = new ArrayList<>();

}
